<include file="public@head" />
</head>

<body>
    <div class="layui-fluid wrap" id="component-tabs">
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">邮箱配置</div>
                    <div class="layui-card-body">
                        <form method="post" class="layui-form js-ajax-form" action="{:url('mailer/test')}">
                            <div class="layui-form-item">
                                <label for="input-to" class="layui-form-label"><span style="color:#FF5722;">*</span>收件箱</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" id="input-to" name="to">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label for="input-subject" class="layui-form-label"><span style="color:#FF5722;">*</span>标题</label>
                                <div class="layui-input-block">
                                    <input type="text" class="layui-input" id="input-subject" name="subject">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label for="input-content" class="layui-form-label"><span style="color:#FF5722;">*</span>内容</label>
                                <div class="layui-input-block">
                                    <textarea name="content" style="display:none;height:300px;"></textarea>
                                    <input type="hidden" name="content" id="content" value="">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button lay-submit lay-skin="*" class="layui-btn js-ajax-submit">发送</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>
    <include file="public@footer" />
    <script>
    layui.config({
        base: '__TMPL__/public/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'layedit', 'form'], function() {
        var $ = layui.$,
            form = layui.form,
            layedit = layui.layedit;
        var index = layedit.build('content', {
            height: 180
        });
        form.on('submit(*)', function(data) {
            $('#content').val(layedit.getContent(index));
        });
    });
    </script>
</body>

</html>